package com.awardsystem.Service;

import com.awardsystem.Dao.ProjectDao;
import com.awardsystem.entity.Project;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProjectService {
    @Autowired
    ProjectDao projectDao;

    public Project findProjectByNumber(String number){return projectDao.findProjectByNumber(number);}
    public void save(Project project){projectDao.save(project);}
    public List<Project> findProjectsByName(String name){return projectDao.findProjectsByName(name);}
    public List<Project> getAll(){return projectDao.findAll();}
    public void delete(Project project){projectDao.delete(project);}
    public Project findById(int id){return projectDao.findProjectById(id);}
}
